package com.qf.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultMsg {
    private int code;
    private String msg;//信息
    private Object data;//数据

    public static ResultMsg success(){
        return new ResultMsg(200,null,null);
    }

    public static ResultMsg  success(Object data){
        return new ResultMsg(200,null,data);
    }

    public static ResultMsg faild(int code){
        return new ResultMsg(code,null,null);
    }

    public static ResultMsg faild(int code,String msg){
        return new ResultMsg(code,msg,null);
    }


}
